//
//  HomeTypeCell.m
//  WanCaiC8
//
//  Created by tangang on 2018/1/29.
//  Copyright © 2018年 tangang. All rights reserved.
//

#import "HomeTypeCell.h"

@implementation HomeTypeCell{
    UIImageView *icon;
    QXLable     *titleLabel;
    UIView      *line1;
    UIView      *line2;
}

- (instancetype)initWithFrame:(CGRect)frame{
    if (self=[super initWithFrame:frame]) {
        
        [self setupUI];
    }
    return self;
}

-(void)setupUI{
    
    WS(weakSelf);
    icon=[[UIImageView alloc]init];
    self.contentView.backgroundColor=[UIColor whiteColor];
    [self.contentView addSubview:icon];
    [icon mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(weakSelf.contentView);
        make.centerY.equalTo(weakSelf.contentView).with.offset(-13);
        make.size.mas_equalTo(CGSizeMake(real_size(30), real_size(30)));
    }];
    
    titleLabel=[[QXLable alloc] init];
    titleLabel.textAlignment=NSTextAlignmentCenter;
    [self.contentView addSubview:titleLabel];
    [titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(icon);
        make.top.equalTo(icon.mas_bottom).with.offset(11);
    }];
    
    
}


- (void)setHomeNavigationByLhcModel:(HomeNavigationByLhcModel *)model{
    
    
    titleLabel.text=model.Name;
    

    NSURL *url=[NSURL URLWithString:model.Logo];
    [icon sd_setImageWithURL:url placeholderImage:[UIImage imageNamed:@"chat_icon"]];
    
}



@end
